package cc.rengu.igas.bomp.common.enums;

import org.springframework.util.StringUtils;

/**
 * 影像类型枚举
 * Created by 王成 on 2020/3/10
 */
public enum ImageTypeEnum {

    BUSINESS_LICENSE("00", "经营执照", "businessLicenseImagePath", "businessLicenseImage"),
    ARTIF_FACE_CERT_IMAGE("01", "法人证件照(人像面)", "artifFaceCertImagePath", "certFaceImage"),
    ARTIF_BACK_CERT_IMAGE("02", "法人证件照(国微面)", "artifBackCertImagePath", "certBackImage"),
    SIGN_PROTOCOL("03", "签约协议照", "signProtocolImagePath", "signProtocolImage"),
    COMPANY_PROVE("04", "单位证明函照片", "companyProveImagePath", "companyProveImage"),
    FUND_MANAGE("05", "资金管理关系证明照", "fundManageImagePath", "fundManageImage"),
    CATERING_PLATFORM("06", "主流餐饮平台入驻证明照", "cateringPlatformImagePath", "settledImage"),
    INSTITUTION_ARTIF_CERT("07", "事业单位法人证书照", "institutionArtifCertImagePath", "institutionalOrganizationImage"),
    SCHOOL_CERT("08", "办学资质照", "schoolCertImagePath", "runSchoolLicenseImage"),
    ARTIF_REG_CERT("09", "法人登记证书照", "artifRegCertImagePath", "artifRegCertImage"),
    MEDICAL_PRACTICE_LICENSE("0A", "医疗执业许可证照", "medicalPracticeLicenseImagePath", "medicalPracticeLicenseImage"),
    CHARGE_SAMPLE_PHOTO("0B", "收费样本照", "chargeSampleImagePath", "chargeSampleImage"),
    NOTE("0C", "照会照", "noteImagePath", "noteImage"),
    PRIVATE_UNIT_REG_CERT("0D", "民办非企业单位登记证书", "privateUnitRegCertImagePath", "privateUnitRegCertImage"),
    SHOP_FRONT_PHOTO("10", "商户门头照", "shopFrontImagePath", "shopEntranceImage"),
    BUSINESS_SITE_PHOTO("11", "经营场所照", "businessSiteImagePath", "businessSiteImage"),
    HOLDING_CERT_PHOTO("12", "手持证件照", "holdingCertImagePath", "holdingCertImage"),
    IPC_RECORD("13", "IPC备案证", "IPCRecordImagePath", "IPCRecordImage"),
    WEB_PHOTO("14", "网站截图", "webPhotoImagePath", "webPhotoImage"),
    SHOP_ENVIRONMENT_PHOTO("15", "门店店面环境照", "shopEnvironmentPhotoImagePath", "shopEnvironmentPhotoImage"),
    SPECIAL_INDUSTRY_PHOTO("16", "特殊行业相关资质照", "specialIndustryPhotoImagePath", "specialIndustryPhotoImage"),
    REAL_NAME_QR_CODE("17", "微信实名认证二维码", "realNameQrcodePath", "realNameQrcode"),
    CREDIT_REPORT("20", "征信报告", "creditReportPath", "creditReport"),
    CREDIT_AUTH("21", "征信授权书", "creditAuthgPath", "creditAuthg"),
    NETWORK_VERIFY_REPORT("22", "联网核查报告", "networkVerifyReportPath", "networkVerifyReport"),
    NET_SETTLEMENT_ACCT("30", "结算账户照(商户结算净额)", "netSettleAcctImagePath", "netSettleAcctImage"),
    FEE_SETTLEMENT_ACCT("31", "结算账户照(商户手续费)", "feeSettlementAcctImagePath", "feeSettlementAcctImage"),
    COLLECT_DEVICE("40", "收款设备照", "collectDeviceImagePath", "collectDeviceImage"),
    TRANS_VOUCHER("41", "交易凭证照", "transVoucherImagePath", "transVoucherImage"),
    SCENE_SERVICE_SHEET("42", "现场服务工单", "sceneServiceSheetImagePath", "sceneServiceSheetImage"),
    MCHNT_TRAIN_CONFIRM_FORM("43", "商户培训确认表", "mchntTrainConfirmFormPath", "mchntTrainConfirmForm"),
    MCHNT_DAILY_CHECKLIST("44", "商户日常检查表", "mchntDailyCheckListPath", "mchntDailyCheckList"),
    SCENE_TRAIN_SIGN_FORM("45", "现场培训签字表", "sceneTrainSignFormPath", "sceneTrainSignForm"),
    USER_HEAD_IMAGE("50", "用户头像", "userHeadImagePath", "userHeadImage"),
    OTHER_ELECTRON_IMAGE("99", "其它电子资料", "otherElectronImagePath", "otherElectronImage"),

    //region 微信优惠费率活动报名影像材料
    SCHOOL_QUALIFICATION_PROOF("W0", "学校资质证明", "SCHOOL_QUALIFICATION_PROOFPath", "SCHOOL_QUALIFICATION_PROOF"),
    COOPERATION_QUALIFICATION_PROOF("W1", "合作资质证明", "COOPERATION_QUALIFICATION_PROOFPath", "COOPERATION_QUALIFICATION_PROOF"),
    ACTIVITY_RATE_COMMITMENT("W2", "优惠费率承诺函", "ACTIVITY_RATE_COMMITMENTPath", "ACTIVITY_RATE_COMMITMENT"),
    CANTEEN_ENVIRONMENT_PHOTO("W3", "食堂内部用餐环境照片", "CANTEEN_ENVIRONMENT_PHOTOPath", "CANTEEN_ENVIRONMENT_PHOTO"),
    CANTEEN_FRONT_PHOTO("W4", "食堂门头照片", "CANTEEN_FRONT_PHOTOPath", "CANTEEN_FRONT_PHOTO"),
    SCHOOL_LICENSE_PROOF("W5", "办学许可证", "SCHOOL_LICENSE_PROOFPath", "SCHOOL_LICENSE_PROOF"),
    QUALIFICATION_PROOF("W6", "机构资质证明", "QUALIFICATION_PROOFPath", "QUALIFICATION_PROOF"),
    STORE_TENANCY_PROOF("W7", "门店租赁相关证明", "STORE_TENANCY_PROOFPath", "STORE_TENANCY_PROOF"),
    STORE_DOOR_PHOTO("W8", "门头照片", "STORE_DOOR_PHOTOPath", "STORE_DOOR_PHOTO"),

    ADDITIONAL_MATERIAL("WZ", "特殊费率活动申请补充材料", "additionalMaterialPath", "additionalMaterial"),
    //endregion

    ;


    /**
     * 签约管理处理的影像类型
     */
    public static final String SIGN_MANAGE_IMAGE_TYPES = "00,01,02";

    /**
     * 影像管理处理的影像类型
     */
    public static final String IMAGE_MANAGE_IMAGE_TYPES = "03,04,10,11,12,13,14,15,16,20,21,22,40,99";

    /**
     * 结算管理处理的影像类型
     */
    public static final String SETTLE_MANAGE_IMAGE_TYPES = "05,30,31";

    /**
     * 微信特殊费率活动申请的影像类型
     */
    public static final String WECHAT_ACTIVITY_IMAGE_TYPES = "W0,W1,W2,W3,W4,W5,W6,W7,W8,WZ";

    private String imageType;
    private String imageDesc;
    private String imagePathKey;
    private String imageName;

    ImageTypeEnum(String imageType, String imageDesc, String imagePathKey, String imageName) {
        this.imageType = imageType;
        this.imageDesc = imageDesc;
        this.imagePathKey = imagePathKey;
        this.imageName = imageName;
    }

    public static ImageTypeEnum getImageTypeEnumByImageType(String imageType) {
        if (StringUtils.isEmpty(imageType)) {
            return null;
        }
        for (ImageTypeEnum imageTypeEnum : ImageTypeEnum.values()) {
            if (imageTypeEnum.getImageType().equals(imageType)) {
                return imageTypeEnum;
            }
        }
        return null;
    }

    public String getImageType() {
        return imageType;
    }

    public String getImageDesc() {
        return imageDesc;
    }

    // public String getImagePathKey() {
    //     return imagePathKey;
    // }
    //
    // public void setImagePathKey(String imagePathKey) {
    //     this.imagePathKey = imagePathKey;
    // }
    //
    // public String getImageName() {
    //     return imageName;
    // }
    //
    // public void setImageName(String imageName) {
    //     this.imageName = imageName;
    // }
}
